import java.io.*;
import java.util.*;

//import com.ws.curlcontractgen.util.LowerCaseMethod;

import freemarker.template.*;

public class Test {

	public static void main(String[] args) throws Exception {
		Configuration cfg = new Configuration();
		cfg.setDirectoryForTemplateLoading(new File("./conf/templates"));
		cfg.setObjectWrapper(new DefaultObjectWrapper());

		Template temp = cfg.getTemplate("contract_main.ftl");
//		Template temp = cfg.getTemplate("test.ftl");

		Map root = new HashMap();
		root.put("doc", freemarker.ext.dom.NodeModel.parse(new File(
				"./conf/xml/OS002No1.xml")));
//		"./conf/xml/test.xml")));

		Writer out = new FileWriter(new File(
				"./output/OscarOS002No1Contract.scurl"));
		temp.process(root, out);
		out.flush();
		System.out.println("Finished!");
	}

}
